package com.example.makerspace.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.makerspace.domain.OrganizeDO;
import com.example.makerspace.domain.OrganizeProjectDO;
import com.example.makerspace.mapper.OrganizeMapper;
import com.example.makerspace.mapper.PersonalRecommendationsMapper;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;

@Component
public class OrganizeDAO extends  BaseDAO<OrganizeDO> {
    @Resource
    private OrganizeMapper organizeMapper;
    @PostConstruct
    public void init(){
        this.mapper = organizeMapper;
    }

    public List<OrganizeDO> selectByUserName(String username) {
        QueryWrapper<OrganizeDO> wrapper = new QueryWrapper<>();
        wrapper.eq("username",username);
        return  mapper.selectList(wrapper);
    }
}
